package com.zs4sdk.jslocalobj;

import android.webkit.JavascriptInterface;


/**
 * 支付界面的js返调类
 *
 * @author chengfu.bao
 */
public class Zs4GameUploadFileJavascriptLocalObj {
    /**
     * 返调监听
     */
    private zs4gameUploadFileJavascriptCallback mCallback;

    /**
     * 返调接口
     *
     * @author chengfu.bao
     */
    public interface zs4gameUploadFileJavascriptCallback {

        /**
         * 调用选择图片
         */
        public void uploadfile();

        /**
         * 提交时接收表单
         * @param param
         */
        public void problem_submit(String param);


        /**
         * 提交时接收表单
         * @param param
         */
        public void account_submit(String param);

    }

    /**
     * 构造方法
     *
     * @param callback
     */
    public Zs4GameUploadFileJavascriptLocalObj(zs4gameUploadFileJavascriptCallback callback) {
        this.mCallback = callback;
    }

    @JavascriptInterface
    public void problem_submit(String parm) {
        if (this.mCallback != null) {
            this.mCallback.problem_submit(parm);
        }
    }

    @JavascriptInterface
    public void uploadfile() {
        if (this.mCallback != null) {
            this.mCallback.uploadfile();
        }
    }

    @JavascriptInterface
    public void account_submit(String parm) {
        if (this.mCallback != null) {
            this.mCallback.account_submit(parm);
        }
    }

}
